package model.pojo;


public class AcOrderdetail  implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	private String orderDetailID;
	
	private String orderID;
	private String productName;
	private int unitID;
	private double ProductNumber=1;
	private double price;
	private double valuation;
	private double taxValue;
	private double total;
	private String note;
	public static double tax=0.0;
	private double taxOne;
	private double supplypircetax;
	private double taxtotal;
	private  int flagTT=1;
	
	
	
	public int getFlagTT() {
		return flagTT;
	}
	public void setFlagTT(int flagTT) {
		this.flagTT = flagTT;
	}
	public double getSupplypircetax() {
		
			supplypircetax = price*(tax+1);
		
		return supplypircetax;
	}
	public void setSupplypircetax(double supplypircetax) {
		this.supplypircetax = supplypircetax;
	}
	public double getTaxtotal() {
		
			taxtotal = ProductNumber * taxOne;
		
		return taxtotal;
	}
	public void setTaxtotal(double taxtotal) {
		this.taxtotal = taxtotal;
	}
	
	
	public double getTaxOne() {
		
			taxOne=price*tax;
		
		return taxOne;
	}
	
	public void setTaxOne(double taxOne) {
		this.taxOne = taxOne;
	}
	
	public AcOrderdetail(){
		taxValue=0.0;
		total=0.0;
		valuation=0.0;
		orderID="";
		orderDetailID="";
		productName = "";
		ProductNumber=1;
		price=0;
		taxOne=0;
		Selected=false;
		flagTT=1;
	}
	private boolean Selected;

	public boolean isSelected() {
		return Selected;
	}
	public void setSelected(boolean selected) {
		Selected = selected;
	}
	public String getOrderDetailID() {
		return orderDetailID;
	}
	public void setOrderDetailID(String orderDetailID) {
		this.orderDetailID = orderDetailID;
	}
	public String getOrderID() {
		return orderID;
	}
	public void setOrderID(String orderID) {
		this.orderID = orderID;
	}
	public String getProductName() {
		return productName;
	}
	public void setProductName(String productName) {
		this.productName = productName;
	}
	public int getUnitID() {
		return unitID;
	}
	public void setUnitID(int unitID) {
		this.unitID = unitID;
	}
	public double getProductNumber() {
		return ProductNumber;
	}
	public void setProductNumber(double productNumber) {
		ProductNumber = productNumber;
	}
	public double getPrice() {
		if(flagTT != 1){
			if(ProductNumber==0)
				ProductNumber=1;
						
			price = supplypircetax /(tax + 1);
		}
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	public double getValuation() {
		
			valuation=ProductNumber*price;
		
		
		return valuation;
	}
	public void setValuation(double valuation) {
		this.valuation = valuation;
	}
	public double getTaxValue() {
		
			taxValue=ProductNumber*price*tax;
		
		return taxValue;
	}
	public void setTaxValue(double taxValue) {

		this.taxValue = taxValue;
	}
	public double getTotal() {
		
			total=valuation+taxValue;
		
		return total;
	}
	public void setTotal(double total) {
		this.total = total;
	}
	public String getNote() {
		return note;
	}
	public void setNote(String note) {
		this.note = note;
	}
	

}


